<template>

</template>

<script>
import axios from "axios";
import * as constant from "@/store/yg/common/constant";

export default {
  data() {
    return {
      financeAccountNo: ''
    };
  },
  methods: {
    async turnToVoucher () {
      const data = {};
      data['id'] = this.$route.query.pid
      axios.post(constant.API_SERVER + "/api/consume/ajax?uri=/finance/account/main&f=edit&type=blank", data).then(res => {
        location.href = "#/blank/finance__voucher__copy?financeAccountNo=" + res.data.accountNo;
        location.reload();
      })
    }
  },
  mounted() {
    this.turnToVoucher()
  }
}
</script>
